package com.yunzheng.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author 郭思良
 * @create 2020-07-23 15:38
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Accessors(chain = true)
@TableName(value = "project_mission")
public class ProjectMission implements Serializable {
    /**
     * 工作项id
     */
    @TableId(value = "mission_id", type = IdType.INPUT)
    private String missionId;

    /**
     * 工作项内容
     */
    @TableField(value = "mission_content")
    private String missionContent;

    /**
     * 所属项目
     */
    @TableField(value = "mission_project")
    private String missionProject;

    /**
     * 工作项名称
     */
    @TableField(value = "mission_title")
    private String missionTitle;

    /**
     * 负责人
     */
    @TableField(value = "mission_manager")
    private String missionManager;

    /**
     * 优先级
     */
    @TableField(value = "mission_priority")
    private Integer missionPriority;

    /**
     * 工作项状态（未进行、进行中、已完成）
     */
    @TableField(value = "mission_status")
    private Integer missionStatus;

    /**
     * 工作项进度
     */
    @TableField(value = "mission_progress")
    private Double missionProgress;

    /**
     * 工作项类型（需求、缺陷、任务）
     */
    @TableField(value = "mission_type")
    private Integer missionType;

    /**
     * 开始时间
     */
    @TableField(value = "start_time")
    private LocalDateTime startTime;

    /**
     * 结束时间
     */
    @TableField(value = "finish_time")
    private LocalDateTime finishTime;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    private static final long serialVersionUID = 1L;

    public static final String COL_MISSION_ID = "mission_id";

    public static final String COL_MISSION_CONTENT = "mission_content";

    public static final String COL_MISSION_PROJECT = "mission_project";

    public static final String COL_MISSION_TITLE = "mission_title";

    public static final String COL_MISSION_MANAGER = "mission_manager";

    public static final String COL_MISSION_PRIORITY = "mission_priority";

    public static final String COL_MISSION_STATUS = "mission_status";

    public static final String COL_MISSION_PROGRESS = "mission_progress";

    public static final String COL_MISSION_TYPE = "mission_type";

    public static final String COL_START_TIME = "start_time";

    public static final String COL_FINISH_TIME = "finish_time";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_TIME = "update_time";

    public ProjectMission(String missionId){
        this.missionId = missionId;
    }

}
